package org.zhouhe.vo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * HotInfoType entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "hot_info_type", catalog = "zpd0t1_db")
public class HotInfoType implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = -1547533574289229302L;
	private Integer hotInfoTypeId;
	private String name;
	private Integer status;
	private Set<HotInfo> hotInfos = new HashSet<HotInfo>(0);

	// Constructors

	/** default constructor */
	public HotInfoType() {
	}

	/** full constructor */
	public HotInfoType(String name, Integer status, Set<HotInfo> hotInfos) {
		this.name = name;
		this.status = status;
		this.hotInfos = hotInfos;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "hot_info_type_id", unique = true, nullable = false)
	public Integer getHotInfoTypeId() {
		return this.hotInfoTypeId;
	}

	public void setHotInfoTypeId(Integer hotInfoTypeId) {
		this.hotInfoTypeId = hotInfoTypeId;
	}

	@Column(name = "name", length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "hotInfoType")
	public Set<HotInfo> getHotInfos() {
		return this.hotInfos;
	}

	public void setHotInfos(Set<HotInfo> hotInfos) {
		this.hotInfos = hotInfos;
	}

}